<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Simditor</title>
    <meta name="viewport" content="width=device-width">

    <link media="all" rel="stylesheet" type="text/css" href="vendor/bower/fontawesome/css/font-awesome.min.css" />
    <link media="all" rel="stylesheet" type="text/css" href="vendor/bower/simditor/styles/simditor.css" />
    <link media="all" rel="stylesheet" type="text/css" href="styles/simditor-emoji.css" />

    <script type="text/javascript" src="vendor/bower/jquery/dist/jquery.min.js"></script>
</head>
<body>

<div class="wrapper">
    <section id="page-demo">
        <textarea id="txt-content" data-autosave="editor-content" autofocus>
            <p>Simditor 是团队协作工具 <a href="http://tower.im">Tower</a> 使用的富文本编辑器。</p>
            <p>相比传统的编辑器它的特点是：</p>
            <ul>
                <li>功能精简，加载快速</li>
                <li>输出格式化的标准 HTML</li>
                <li>每一个功能都有非常优秀的使用体验</li>
            </ul>
        </textarea>
    </section>
</div>

<script type="text/javascript" src="vendor/bower/simple-module/lib/module.js"></script>
<script type="text/javascript" src="vendor/bower/simple-uploader/lib/uploader.js"></script>
<script type="text/javascript" src="vendor/bower/simple-hotkeys/lib/hotkeys.js"></script>
<script type="text/javascript" src="vendor/bower/simditor/lib/simditor.js"></script>
<script type="text/javascript" src="lib/simditor-emoji.js"></script>
<script type="text/javascript">
$(function() {
    var editor = new Simditor({
        textarea: $('#txt-content'),
        placeholder: '这里输入文字...',
        pasteImage: true,
        toolbar: ['emoji', 'title', 'bold', 'italic', 'underline', 'strikethrough', '|', 'ol', 'ul', 'blockquote', 'code', 'table', '|', 'link', 'image', 'hr', '|', 'indent', 'outdent'],
        defaultImage: 'images/image.png',
        upload: location.search === '?upload' ? {
            url: '/upload'
        } : false,
        emoji: {
            imagePath: 'images/emoji/'
        }
    });
});
</script>

</body>
</html>
